<template>
	<view class="page flex flex-column grid-gap-6 px-6">
		<view class="flex-1" />
		<view class="flex flex-center">
			<view class="bg-danger rounded-circle">
				<uni-icons type="closeempty" size="70" color="var(--xl-white)"></uni-icons>
			</view>
		</view>
		<view class="flex flex-column grid-gap-2 flex-center">
			<text class="h6 font-weight-600">错误码：{{ code }}</text>
			<text class="h8 font-weight-600">{{ message }}</text>
		</view>
		<view class="flex-1" />
		<view class="flex">
			<button class="btn-danger btn-round flex-1" @tap="$page.re('/pages/index/index')">返回首页</button>
		</view>
		<view class="flex-1" />
	</view>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { onLoad } from '@dcloudio/uni-app';
import { $page } from '@/utils';
const message = ref('');
const code = ref('');
onLoad((options: any) => {
	message.value = options.msg;
	code.value = options.errcode;
})
</script>
<style lang="scss" scoped>
.page {
	height: calc(100vh - var(--window-top));
}
</style>